home *** CD-ROM | disk | FTP | other *** search
/ Clinton - Portrait of Victory / PORTRAIT OF VICTORY.BIN / clntpc16 / eagle.txt < prev    next >
Text File  |  1992-12-30  |  9KB  |  478 lines

  1. ifvideo m okayv
  2.  
  3. ifvideo 1
  4.   video 1
  5.   set center on
  6.   text 0 20 "Sorry, this program requires a VGA card to run."
  7.   text 0 17 "Press <ENTER> to exit."
  8.   set center off
  9. endif
  10.  
  11. ifvideo 2
  12.   video 2
  13.   set center on
  14.   text 0 20 "Sorry, this program requires a VGA card to run."
  15.   text 0 17 "Press <ENTER> to exit."
  16.   set center off
  17. endif
  18.  
  19. ifvideo h
  20.   video h
  21.   set center on
  22.   text 0 200 "Sorry, this program requires a VGA card to run."
  23.   text 0 170 "Press <ENTER> to exit."
  24.   set center off
  25. endif
  26.  
  27. waitkey
  28. exit
  29.  
  30. okayv:
  31. ifmem 410000 okaym
  32. video 1
  33. text 8 21 "THERE IS NOT ENOUGH AVAILABLE MEMORY FOR THIS PRESENTATION"
  34. text 8 20 "TO RUN.  TO REMEDY THIS, TRY THE FOLLOWING:"
  35.  
  36. text 8 17 "Reboot your computer with a bootable floppy disk that"
  37. text 8 16 "contains COMMAND.COM to remove any memory resident"
  38. text 8 15 "programs that were installed and try the presentation"
  39. text 8 14 "again.  After viewing the presentation, reboot your"
  40. text 8 13 "computer normally to restore your original set-up."
  41.  
  42. set center on
  43. text 0 10 "Press <ENTER> to quit."
  44. set center off
  45. waitkey
  46. exit
  47.  
  48. okaym:
  49. video m
  50. ;----------------------------------------------------------------------------
  51. ;Initialize CD-ROM drive
  52. ;----------------------------------------------------------------------------
  53. cdinit
  54.  
  55. set esc off
  56. set space off
  57. set wrap off
  58. set abort off
  59.  
  60. pload ebkg 1
  61. palette 1
  62. pfade 9 1
  63. pfree 1
  64. pload etit 1
  65. cfade 9 96 187 p1
  66. pfree 1
  67.   cdplay 69 23
  68.   timer
  69.   lpm2:
  70.   if @elapsed<23000
  71.     goto lpm2
  72.   endif
  73.   cdstop
  74. cload ebkgx 1 1
  75. cfade 9 0 68 1
  76. cfree 1
  77.  
  78. menu1:
  79. cload emtit 1 1
  80. cfade 9 112 107 1
  81. cfree 1
  82. cload ebche 1 1
  83. cfade 9 0 0 1
  84. cfree 1
  85. mn1:
  86. waitkey
  87. getkey k
  88. if @k==1
  89.   cload ebkgx 1 1
  90.   cfade 9 0 68 1
  91.   cfree 1
  92.   link eagle1
  93. else
  94.   if @k==2
  95.     cload ebkgx 1 1
  96.     cfade 9 0 68 1
  97.     cfree 1
  98.     link eagle2
  99.   else
  100.     if @k==3
  101.       cload ebkgx 1 1
  102.       cfade 9 0 68 1
  103.       cfree 1
  104.       link eagle3
  105.     else
  106.       if @k==chr(104)||@k==chr(72)
  107.         goto help
  108.       else
  109.         if @k==chr(99)||@k==chr(67)
  110.           goto credits
  111.         else
  112.           if @k==chr(101)||@k==chr(69)
  113.             cload ebkgx 1 1
  114.             cfade 9 0 68 1
  115.             cfree 1
  116.             pload edexit 1
  117.             cfade 9 192 201 p1
  118.             pfree 1
  119.             menu1b:
  120.             waitkey
  121.             getkey k
  122.             if @k==chr(13)
  123.               exit
  124.             else
  125.               if @k==chr(27)
  126.                 cload ebkgx 1 1
  127.                 cfade 9 0 68 1
  128.                 cfree 1
  129.                 cload emtit 1 1
  130.                 cfade 9 112 107 1
  131.                 cfree 1
  132.                 goto mn1
  133.               else
  134.                 goto menu1b
  135.               endif
  136.             endif
  137.           else
  138.             goto mn1
  139.           endif
  140.         endif
  141.       endif
  142.     endif
  143.   endif
  144. endif
  145. exit
  146.  
  147. help:
  148. pload ebkg 1
  149. pfade 9 1
  150. pfree 1
  151. pload edhelp 1
  152. cfade 9 32 74 p1
  153. pfree 1
  154. fload ibm8 1
  155. fgaps 1 4 2
  156. set buf readfile(mainhlp.doc)
  157. window 65 345 575 100
  158. color 1
  159. text @@buf
  160. . farfree(@buf)
  161. window
  162. ffree 1
  163. hlp1:
  164. waitkey
  165. getkey k
  166. if @k==chr(13)
  167.   pload ebkg 1
  168.   pfade 9 1
  169.   pfree 1
  170.   goto menu1
  171. else
  172.   goto hlp1
  173. endif
  174.  
  175. credits:
  176. set num 1
  177. pload ebkg 1
  178. pfade 9 1
  179. pfree 1
  180. crd1:
  181. cload etxtx2 1 1
  182. cfade 9 40 90 1
  183. cfree 1
  184. color 1
  185. fload ibm8 1
  186. fgaps 1 4 2
  187. set buf readfile(crds$@num$.doc)
  188. window 60 95 580 400
  189. text @@buf
  190. . farfree(@buf)
  191. window
  192. set center on
  193. ffree 1
  194. fload ibm8 1
  195. text 0 135 "Page "$@num$" of 2"
  196. text 0 125 "Press <PGUP> for next or <PGDN> for prior."
  197. text 0 105 "PRESS <ENTER> TO RETURN TO MENU"
  198. set center off
  199. ffree 1
  200. crd2:
  201. waitkey
  202. getkey k
  203. if @k==chr(13)
  204.   pload ebkg 1
  205.   pfade 9 1
  206.   pfree 1
  207.   goto menu1
  208. else
  209.   if @k==chr(73)$chr(1)||@k==chr(72)$chr(1)
  210.     if @num==2
  211.       set num 1
  212.       goto crd1
  213.     else
  214.       set num @num+1
  215.       goto crd1
  216.     endif
  217.   else
  218.     if @k==chr(81)$chr(1)||@k==chr(80)$chr(1)
  219.       if @num==1
  220.         set num 2
  221.         goto crd1
  222.       else
  223.         set num @num-1
  224.         goto crd1
  225.       endif
  226.     else
  227.       goto crd2
  228.     endif
  229.   endif
  230. endif
  231.  
  232. ;
  233. ;    CDINIT
  234. ;
  235. ;    Check for CD-ROM driver and setup @drive
  236. ;
  237. cdinit:
  238.     int 0x2f 0x1500,0
  239.     if @bx
  240.         global drive chr(@cx+asc("A"))
  241.     else
  242.         global drive ""
  243.     endif
  244.     return
  245.  
  246. cdplay:
  247.     cdtrack    @1 @3 @4 @5
  248.     cdcmd    132,@0,@2*75
  249.     cdcheck    @0,cdplay
  250.     return
  251.  
  252. ;
  253. ;    CDPLAYTO TRACK MINUTES SECONDS FRAMES TRACK MINUTES SECONDS FRAMES
  254. ;
  255. ;
  256. cdplayto:
  257.     cdtrack    @1 @2 @3 @4
  258.     local    begin @0
  259.     cdtrack    @5 @6 @7 @8
  260.     local    end @0
  261.     cdcmd    132,@begin,@end-@begin
  262.     cdcheck    @0,cdplayto
  263.     return
  264.  
  265. ;
  266. ;    CDSTOP
  267. ;
  268. ;    Stop playing immediately
  269. ;
  270. cdstop:
  271.     cdcmd    133,0,0
  272.     cdcheck    @0,cdstop
  273.     return
  274.  
  275. ;
  276. ;    CDRESUME
  277. ;
  278. ;    Resume playing from where we issued a CDSTOP
  279. ;
  280. cdresume:
  281.     cdcmd    136,0,0
  282.     cdcheck    @0,cdresume
  283.     return
  284.  
  285. ;
  286. ;    CDSEEK TRACK {MINUTES SECONDS FRAMES}
  287. ;
  288. ;    Seek the CD player head to a track to minimize play startup time.
  289. ;    Parameters are the same as CDPLAY.
  290. ;
  291. cdseek:
  292.     cdtrack @1 @2 @3 @4
  293.     cdcmd 131,@0,0
  294.     cdcheck    @0,cdseek
  295.     return
  296.  
  297. ;
  298. ;    CDEJECT
  299. ;
  300. ;    Open the CD drive's tray/door
  301. ;
  302. cdeject:
  303.     local    buf ofs("1")
  304.     local    bseg seg(@buf);
  305.     poke    @bseg @buf 0                ;Eject Disk
  306.     cdcmd    12,@buf|(@bseg<<16),1            ;WRITE IOCTL Output
  307.     cdcheck    @0,cdeject
  308.     return
  309.  
  310. ;
  311. ;    CDCLOSE
  312. ;
  313. ;    Close the CD drive's tray/door
  314. ;
  315. cdclose:
  316.     local    buf ofs("1")
  317.     local    bseg seg(@buf);
  318.     poke    @bseg @buf 5                ;Close Tray
  319.     cdcmd    12,@buf|(@bseg<<16),1            ;WRITE IOCTL Output
  320.     cdcheck    @0,cdclose
  321.     return
  322.  
  323.  
  324. ;
  325. ;    CDSTATUS
  326. ;
  327. ;    Return CD Drive status and setup global variables @first and @last
  328. ;
  329. cdstatus:
  330.     local    buf ofs("123456")
  331.     local    bseg seg(@buf);
  332.     poke    @bseg @buf 10                ;Audio Disk Info
  333.     cdcmd    3,@buf|(@bseg<<16),6            ;READ IOCTL Input
  334.     cdcheck    @0,cdstatus
  335.     global    first peek(@bseg,@buf+1)+0
  336.     global    last  peek(@bseg,@buf+2)+0
  337.     poke    @bseg @buf 6                ;Device status
  338.     cdcmd    3,@buf|(@bseg<<16),5            ;READ IOCTL Input
  339.     cdcheck    @0,cdstatus
  340.     return    peekl(@bseg,@buf+1)
  341.  
  342. ;
  343. ;    CDTRACK TRACK MINUTES SECONDS FRAMES
  344. ;
  345. ;    Return the absolute sector number of a track
  346. ;
  347. cdtrack:
  348.     local    buf ofs("1234567")
  349.     local    bseg seg(@buf);
  350.     poke    @bseg @buf 11                ;Get Audio Track Info
  351.     poke    @bseg @buf+1 @1             ;track number
  352.     cdcmd    3,@buf|(@bseg<<16),7            ;READ IOCTL Input
  353.     cdcheck    @0,cdtrack
  354.     return    peekl(@bseg,@buf+2)+(@2*60+@3)*75+@4    ;return track address
  355.  
  356.  
  357. cdcmd:
  358.     local req ofs("12345678901234567890123456")
  359.     local rseg seg(@req)
  360.     poke  @rseg @req 13                ;param length
  361.     poke  @rseg @req+1 0                ;subunit
  362.     poke  @rseg @req+2 @1                ;command code
  363.     pokew @rseg @req+3 0                ;status
  364.     pokel @rseg @req+5 0 0                ;reserved
  365.     poke  @rseg @req+13 1                ;address mode
  366.     pokel @rseg @req+14 @2                ;begin
  367.     pokel @rseg @req+18 @3                ;length
  368.     pokel @rseg @req+22 0                ;reserved
  369.     int 0x2f 0x1510,@req,asc(@drive)-asc("A"),,,,,seg(@req)
  370.     if peek(@rseg,@req+4)&0x80
  371.         databegin
  372.             "Unknown Error"
  373.             "Write-protect violation"
  374.             "Unknown unit"
  375.             "Drive not Ready"
  376.             "Unknown command"
  377.             "CRC error"
  378.             "Bad drive request structure length"
  379.             "Seek Error"
  380.             "Unknown media"
  381.             "Sector not found"
  382.             "Printer out of paper"
  383.             "Write Fault"
  384.             "Read Fault"
  385.             "General failure"
  386.             "Reserved 1"
  387.             "Reserved 2"
  388.             "Invalid disk change"
  389.         dataend
  390.         if peek(@rseg,@req+3)<16
  391.             dataskip peek(@rseg,@req+3)+1
  392.         endif
  393.         return @
  394.     else
  395.         return ""
  396.     endif
  397.  
  398.  
  399. cdcheck:
  400.     if @1!=""
  401.         clearscr 0
  402.         fload ibm8 1
  403.         color 15
  404.         set center on
  405.         text 0 200 @2$": "$@1
  406.         text 0 180 "Press any key to exit"
  407.         set center off
  408.         ffree 1
  409.         waitkey
  410.         exit            
  411.     endif
  412.     return
  413.  
  414.  
  415. prtstatus:
  416.     if @1&1
  417.         text "Door Open"$chr(10)
  418.     else
  419.         text "Door Closed"$chr(10)
  420.     endif
  421.  
  422.     if @1&2
  423.         text "Door unlocked"$chr(10)
  424.     else
  425.         text "Door locked"$chr(10)
  426.     endif
  427.  
  428.     if @1&4
  429.         text "Supports cooked and raw reading"$chr(10)
  430.     else
  431.         text "Supports only cooked reading"$chr(10)
  432.     endif
  433.  
  434.     if @1&8
  435.         text "Read/write"$chr(10)
  436.     else
  437.         text "Read only"$chr(10)
  438.     endif
  439.  
  440.     if @1&16
  441.         text "Data read and plays audio/video tracks"$chr(10)
  442.     else
  443.         text "Data read only"$c